<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>添加网点</title>
<script type="text/javascript">
	/**查找带回机构信息*/
	function lookUpExpressCompany() {
		$.pdialog.open('expressCompanyLookUp', 'expressInfo', '公司信息', {
			width : 800,
			height : 400,
			mask : true
		});
	}
	
	
	/**
	 * 选择省市区，触发变化，表单参数值传入隐藏域
	 */
	function areaOnChange(obj,str){
		var $obj = $(obj);
		var text = $obj.find("option:selected").text();
		$("#"+str).val(text); 
	}


</script>
</head>
<body>
	<div class="pageContent">
		<form class="pageForm required-validate" method="post" action="addNetsiteAction.action" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<input type="hidden" name="rightId" value="${rightId}" />
			<div class="pageFormContent" layoutH="56">
				<table>
					<tr>
						<td>网点名称：</td>
						<td><input name="name" type="text" size="30" class="required textInput valid" /></td>
					</tr>

					<!--查找带回 -->
					<tr>
						<td>所属公司：</td>
						<td><input type="text" class="required"  bringBackName="expressCompany.expressCompanyName"  name="expressCompanyName" readonly="readonly" size="30" class="required textInput valid" /> 
						<input type="hidden" bringBackName="expressCompany.expressCompanyId" name="expressCompanyId"  /> 
						<a class="btnLook" href="expressCompanyLookUp"  lookupGroup="expressCompany" >查找带回</a></td>
					</tr>
					<!-- <tr>
						<td>唯一编码：</td>
						<td><input name="code" type="text" size="30" class="required textInput valid" /></td>
					</tr> -->
					<tr>
						<td>联系电话：</td>
						<td><input name="telephone" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>手机号码：</td>
						<td><input name="mobile" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>省市区：</td>
						<td><select onChange="areaOnChange(this,'provinceName')" class="combox" name="provinceId" ref="combox_city" refUrl="getAreasNolimitAction.action?parentId={value}">
								<option value="" >不限</option>
								<c:forEach items="${areaList}" var="li">
									<option value="${li.id}">${li.name}</option>
								</c:forEach>
						</select> <select onChange="areaOnChange(this,'cityName')" class="combox" name="cityId" id="combox_city" ref="combox_area" refUrl="getAreasNolimitAction.action?parentId={value}">
						</select> <select onChange="areaOnChange(this,'districtName')" class="combox" name="districtId" id="combox_area">
						</select></td>
					</tr>
					<tr>
						<td>详细地址：</td>
						<td><input name="address" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td><span>开始取件时间：</span></td>
						<td><span><select name="startTime" style="width: 193px">
									<option value="8时">8时</option>
									<option value="9时">9时</option>
									<option value="10时">10时</option>
									<option value="11时">11时</option>
									<option value="12时">12时</option>
									<option value="13时">13时</option>
									<option value="14时">14时</option>
									<option value="15时">15时</option>
									<option value="16时">16时</option>
									<option value="17时">17时</option>
									<option value="18时">18时</option>
									<option value="19时">19时</option>
									<option value="20时">20时</option>
							</select></span></td>
					</tr>
					<tr>
						<td>结束取件时间：</td>
						<td><span><select name="endTime" style="width: 193px">
									<option value="8时">8时</option>
									<option value="9时">9时</option>
									<option value="10时">10时</option>
									<option value="11时">11时</option>
									<option value="12时">12时</option>
									<option value="13时">13时</option>
									<option value="14时">14时</option>
									<option value="15时">15时</option>
									<option value="16时">16时</option>
									<option value="17时">17时</option>
									<option value="18时">18时</option>
									<option value="19时">19时</option>
									<option value="20时">20时</option>
							</select></span></td>
					</tr>
					<tr>
						<td>网点状态：</td>
						<td><select class="" name="enabled" style="width: 193px">
								<option value="1">可用</option>
								<option value="0">禁用</option>
						</select></td>
					</tr>
					<tr>
						<td>负责人姓名：</td>
						<td><input name="principal" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>登录账户：</td>
						<td><input name="principalAccount" type="text" size="30" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>登录密码：</td>
						<td><input name="principalPwd" type="password" size="30" class="required textInput valid" /></td>
					</tr>
				</table>
				<!--传参 -->
				<div>
					<input id="provinceName" type="hidden" name="provinceName" class="required textInput valid"> <input id="cityName" type="hidden" name="cityName" class="required textInput valid"> <input id="districtName" type="hidden" name="districtName" class="required textInput valid">
				</div>
			</div>
			<div class="formBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">保存</button>
							</div>
						</div>
					</li>
					<li>
						<div class="button">
							<div class="buttonContent">
								<button type="button" class="close">取消</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</form>
	</div>
</body>
</html>